import request from '@/utils/request'

// 获取城市列表
// 获取城市列表数据
export const getCityList = () => request.get('/area/city?level=1')
// 获取热门城市
export const getHotCity = () => {
  return request.get('/area/hot')
}

// 根据本地id获取房源信息的经纬度
export const getmapxy = id => request.get('/area/map', {
  params: {
    id
  }
})
// 将城市id传入本地
const KEYID = 'my-cityID'
export const setcityID = id => {
  localStorage.setItem(KEYID, id)
}
// 获取本地城市id
export const getcitybdID = () => localStorage.getItem(KEYID)
